Skip to content

Clear suppress timer before overwrite in handleModelSet#130

Merged
siddseethepalli merged 1 commit into
mainfrom
fix/suppress-timer-clear
Feb 8, 2026
Merged

Clear suppress timer before overwrite in handleModelSet#130
siddseethepalli merged 1 commit into
mainfrom
fix/suppress-timer-clear

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Feb 8, 2026

Summary

Addresses feedback from #127:

  • Clear the existing __suppress_reset__ timer before creating a new one in handleModelSet. Without this, rapid successive model changes would leave orphaned timers that fire early, resetting suppressConfigReload to false prematurely and causing the file watcher to trigger redundant config reloads that evict sessions.

This matches the pattern already used in the file watcher debounce code (lines 121-122).

Test plan

  • tsc --noEmit passes
  • All 212 tests pass

🤖 Generated with Claude Code


Open with Devin

Rapid successive handleModelSet calls would overwrite the
__suppress_reset__ timer in the map without cancelling the previous one.
The orphaned timer would fire early, resetting suppressConfigReload to
false before the latest write's file watcher event arrives, causing
unexpected config reloads and session eviction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@siddseethepalli siddseethepalli merged commit 11b4401 into main Feb 8, 2026
@siddseethepalli siddseethepalli deleted the fix/suppress-timer-clear branch February 8, 2026 23:01
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant